package com.tchintech.pay.utils;

import android.content.Context;

import com.tchintech.pay.R;
import com.tchintech.pay.interfaces.OrderStateInterface;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2017/7/8 0008.
 */

public class OrderState implements OrderStateInterface {
    static Map<String, String> orderState = new HashMap<String, String>();

    Context context;

    public OrderState(Context context) {
        this.context = context;
        init();
    }

    private void init() {
        orderState.put(SUCCESS, context.getResources().getString(R.string.SUCCESS));
        orderState.put(ISOE, context.getResources().getString(R.string.ISOE));
        orderState.put(OVERDUE, context.getResources().getString(R.string.OVERDUE));
        orderState.put(PCON, context.getResources().getString(R.string.PCON));
        orderState.put(UNPAY, context.getResources().getString(R.string.UNPAY));
        orderState.put(ERROR, context.getResources().getString(R.string.ERROR));
        orderState.put(FAIL, context.getResources().getString(R.string.FAIL));
    }


    public String getState(String key) {
        return orderState.get(key);
    }
}
